module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 184);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file.
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

module.exports = function normalizeComponent (
  rawScriptExports,
  compiledTemplate,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */
) {
  var esModule
  var scriptExports = rawScriptExports = rawScriptExports || {}

  // ES6 modules interop
  var type = typeof rawScriptExports.default
  if (type === 'object' || type === 'function') {
    esModule = rawScriptExports
    scriptExports = rawScriptExports.default
  }

  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (compiledTemplate) {
    options.render = compiledTemplate.render
    options.staticRenderFns = compiledTemplate.staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = injectStyles
  }

  if (hook) {
    var functional = options.functional
    var existing = functional
      ? options.render
      : options.beforeCreate

    if (!functional) {
      // inject component registration as beforeCreate hook
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    } else {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functioal component in vue file
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return existing(h, context)
      }
    }
  }

  return {
    esModule: esModule,
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 184:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _inputMixin = __webpack_require__(185);

var _inputMixin2 = _interopRequireDefault(_inputMixin);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* istanbul ignore next */
_inputMixin2.default.install = function (Vue) {
  Vue.component(_inputMixin2.default.name, _inputMixin2.default);
};

exports.default = _inputMixin2.default;

/***/ }),

/***/ 185:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue__ = __webpack_require__(61);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_218ffb22_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_input_mixin_vue__ = __webpack_require__(186);
var normalizeComponent = __webpack_require__(0)
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_input_mixin_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_218ffb22_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_input_mixin_vue__["a" /* default */],
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 186:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['el-input-mixin',

  {
    'is-disabled': _vm.inputDisabled,
    'el-input-group': _vm.$slots.prepend || _vm.$slots.append,
    'el-input-group--append': _vm.$slots.append,
    'el-input-group--prepend': _vm.$slots.prepend,
    'el-input--prefix': _vm.$slots.prefix || _vm.prefixIcon,
    'el-input--suffix': _vm.$slots.suffix || _vm.suffixIcon || _vm.clearable
  }],on:{"mouseenter":function($event){_vm.hovering = true},"mouseleave":function($event){_vm.hovering = false}}},[_c('ul',_vm._l((_vm.sizeArr.length),function(i){return _c('li',{key:i,ref:"refs",refInFor:true,staticClass:"el-input-mixin__outer"},[(_vm.sizeArr[i]<0)?_c('i',[_vm._v("————")]):_vm._e(),_c('div',{staticClass:"el-input-mixin__inner",attrs:{"contenteditable":"true","onpaste":"return false","keyNumber":i,"onkeydown":""},on:{"keydown":_vm.handleKeydown,"keyup":_vm.handleKeyup}})])})),_c('input',{ref:"input",staticStyle:{"display":"none"},attrs:{"tabindex":_vm.tabindex,"readonly":_vm.readonly},domProps:{"value":_vm.currentValue},on:{"input":_vm.getCurValue}})])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);

/***/ }),

/***/ 61:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

exports.default = {
  name: 'CmInputMixin',
  inject: {
    CmForm: {
      default: ''
    },
    CmFormItem: {
      default: ''
    }
  },
  props: {
    sizeArr: {
      type: Array,
      default: function _default() {
        return [4, 4, 4, 4];
      }
    },
    value: {}
  },
  data: function data() {
    return {
      inputArr: [],
      curIndex: 0,
      test: 'test',
      currentValue: 0,
      textareaCalcStyle: {},
      hovering: false,
      focused: false,
      isOnComposition: false,
      valueBeforeComposition: null
    };
  },

  computed: {},
  watch: {
    value: {
      immediate: true,
      handler: function handler(value) {
        var newVal = value === undefined ? value : Number(value);
        if (newVal !== undefined) {
          if (isNaN(newVal)) {
            return;
          }
        }
        this.currentValue = newVal;
        this.$emit('input', newVal);
      }
    }
  },
  created: function created() {
    this.inputArr = [];
    for (var i = 0; i < this.sizeArr.length; i++) {
      this.inputArr.push([]);
    }
  },

  methods: {
    getCurArr: function getCurArr(curIndex) {
      var start = 0;
      var size = Math.abs(this.sizeArr[curIndex]);
      for (var i = 0; i < curIndex; i++) {
        start += Math.abs(this.sizeArr[i]);
      }
      return this.inputArr.slice(start, size);
    },
    getCurValue: function getCurValue() {
      var finalArr = [].concat.apply([], this.inputArr);
      this.currentValue = this.transArrToNum(finalArr);
      this.$emit('input', this.currentValue);
    },
    getBlock: function getBlock(i) {
      var curArr = this.getCurArr(i - 1);
      var result = this.transArrToNum(curArr);
      return result || '';
    },
    endFocus: function endFocus(el) {
      el.focus();
      var range = document.createRange();
      range.selectNodeContents(el);
      range.collapse(false);
      var sel = window.getSelection();
      sel.removeAllRanges();
      sel.addRange(range);
    },
    frontFocus: function frontFocus(el) {
      el.focus();
    },
    transArrToNum: function transArrToNum(arr) {
      return parseInt(arr.join(''), 10);
    },
    handleKeyup: function handleKeyup(e) {
      var keyCode = e.keyCode;
      var target = e.target;
      var curIndex = target.attributes[2].value - 1;
      if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105 || keyCode === 8) return;
      target.innerText = this.transArrToNum(this.inputArr[curIndex]);
      this.endFocus(target);
      this.getCurValue();
    },
    handleKeydown: function handleKeydown(event) {
      var keyCode = event.keyCode;
      var target = event.target;
      var curIndex = target.attributes[2].value - 1;
      var curArr = this.inputArr[curIndex];
      // 数字
      if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) {
        if (curIndex === this.sizeArr.length - 1 && curArr.length >= this.sizeArr[curIndex]) {
          target.blur();
          return;
        } else if (curArr.length >= this.sizeArr[this.curIndex]) {
          var nextIndex = curIndex + 1;
          var next = this.$refs.refs[nextIndex].childNodes[1];
          var nextArr = this.inputArr[nextIndex];
          nextArr.unshift(event.key);
          nextArr = nextArr.slice(0, 4);
          this.frontFocus(next);
          // next.innerText = nextArr;
          return;
        } else {
          curArr.push(event.key);
          return;
        }
      }
      // Backspace, del, 左右方向键
      if (keyCode === 8) {
        if (curIndex === 0 && curArr.length === 0) return false;else if (curArr.length === 0) {
          var preIndex = curIndex - 1;
          var pre = this.$refs.refs[preIndex].childNodes[1];
          this.inputArr[preIndex].pop();
          this.endFocus(pre);
          return;
        } else {
          this.inputArr[curIndex].pop();
          return;
        }
      }
    }
  }
};

/***/ })

/******/ });